<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="<%=path%>/css/base.css">
<link rel="stylesheet" type="text/css" href="<%=path%>/css/layout.css">
<script src="<%=path%>/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
	$(function() {

		var width = screen.availWidth;
		var height = screen.availHeight;
		$(".wxts").css({
			"width" : width,
			"height" : height
		});
		$(".wxts_btn").click(function() {
			$(".wxts").css("display", "none");
		});
		$("[name=guanbi]").click(function(){
			$(".wxts").css("display", "none");
		});
		$("[name=checkall]").click(function(){
			$("[name=checkboxs]").prop("checked", true);
		});
		$("[name=uncheck]").click(function(){
			$("[name=checkboxs]").prop("checked", false);
		});
		$("[name=ss_add]").click(function(){
			$(".wxts").css("display", "block");
			$("#a_id").val("");
			$("#a_idd").val("");
			$("#a_url").val("");
			$("#a_title").val("");
			$("#a_id").prop("name","add_id");
			$("#a_idd").prop("name","add_idd");
			$("#a_url").prop("name","add_url");
			$("#a_title").prop("name","add_title");
			$("#qqqddd").val("添加");
			$("#title_name").text("添加");
			
		});
		$(".xxxxx").click(function() {
			$(".wxts").css("display", "block");
			var tb = $(this).parent().children();
			var id = tb[1].innerHTML;
			var url = tb[4].innerHTML;
			var title = tb[3].innerHTML;
			$("#qqqddd").val("修改");
			$("#title_name").text("修改");
			$("#a_id").val(id);
			$("#a_idd").val(id);
			$("#a_url").val(url);
			$("#a_title").val(title);
			$("#a_id").prop("name","xg_id");
			$("#a_idd").prop("name","xg_idd");
			$("#a_url").prop("name","xg_url");
			$("#a_title").prop("name","xg_title");
		});
		
	});
</script>
<style type="text/css">
.wxts {
	background-color: #000000;
	position: fixed;
	top: 0px;
	left: 0px;
	display: none;
	background: rgba(10, 10, 10, 0.5);
}

.wxts_ts {
	text-align: center;
	background-color: #FFFFFF;
	width: 350px;
	height: 200px;
	margin: 18% auto;
	border-radius: 6px;
}

.wxts_ts h1 {
	padding-top: 10px;
}

.wxts_ts p {
	margin-top: 20px;
}

</style>
</head>
<body>
	<div class="bsinfo">
		<div class="bsinfo_title">系统幻灯片</div>
		<form action="backstage_slideshow" method="post">
		<input class="slideshow_btn fdr" style="width:92px;height:37px;" type="submit" value="删除">
		<div class="slideshow_btn fdr" name="ss_add">添加</div>
			<div class="bsinfo_body">
				<div class="bsinfo_body_box">
					<table style="width: 96%; padding: 10px 2%;" border="0"
						cellpadding="0" cellspacing="0" name="ss_tb">
						<tr style="text-align: center;">
							<td><input  type="button" name="checkall" value="全选"><input  type="button" name="uncheck" value="不选"></td>
							<td>id</td>
							<td>预览</td>
							<td>标题</td>
							<td>url</td>
							<td>操作</td>
						</tr>
						<c:forEach items="${list }" var="a">
							<tr style="text-align: center;">
								<td><input type="checkbox" name="checkboxs" value=${a.getId()}></td>
								<td>${a.getId()}</td>
								<td><img src="${a.getUrl()}"
									style="width: 150px; height: 80px"></td>
								<td>${a.getTitle()}</td>
								<td>${a.getUrl()}</td>
								<td class="xxxxx" style="background-color: black; color: white">修改</td>
							</tr>
						</c:forEach>
					</table>
				</div>
			</div>
		</form>
	</div>


	<div class="wxts">
		<div class="wxts_ts">
			<h1 id="title_name">修改</h1><br>
			<form action="backstage_slideshow"  method="post">
				 i&nbsp;&nbsp;d : <input id="a_id" type = "hidden" name="xg_id"><input id="a_idd" name="xg_idd" disabled="disabled"><br><br>
				 标题: <input id="a_title" type = "text" name="xg_title"><br><br>
				  URL: <input id="a_url" type = "text"  name="xg_url"><br><br>
				  <input id="qqqddd" type="submit" value="修改">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="guanbi" value="关闭">
			</form>

		</div>
	</div>
</body>

</html>